package com.gidgabs.modules.api.controller;

import com.gidgabs.common.annotation.AuthIgnoreApi;
import com.gidgabs.common.utils.ReturnJson;
import com.gidgabs.modules.api.service.TbProductTypeService;
import com.gidgabs.modules.entity.TbProductTypeEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 产品类型字典表
 *
 * @author lanyonglin
 * @email www.baidu.com
 * @date 2018-07-02 10:07:40
 */
@Api("产品类型功能模块")
@RestController
@RequestMapping("/api/producttype")
public class TbProductTypeController {

    @Autowired
    private TbProductTypeService productTypeService;

    /**
     * 查询产品类型列表 即首页产品类型
     */
    @AuthIgnoreApi
    @ApiOperation(value = "查询产品类型列表 即首页产品类型")
    @GetMapping("/list")
    public ReturnJson<TbProductTypeEntity> list() {
        TbProductTypeEntity productType = new TbProductTypeEntity();
        return ReturnJson.success("查询成功", productTypeService.queryByObject(productType));
    }

}
